package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.domain.R;
import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.knowledge.domain.FilesLabel;
import cn.cdeden.knowledge.domain.dto.FilesLabelDto;
import cn.cdeden.knowledge.domain.dto.FilesLabelExistence;
import cn.cdeden.knowledge.domain.dto.FilesLabelQueryParam;
import cn.cdeden.knowledge.vo.FilesLabelQueryVO;
import com.baomidou.mybatisplus.extension.service.IService;
import io.undertow.util.BadRequestException;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

public interface FilesLabelService extends IService<FilesLabel>{

    List<FilesLabelQueryVO> getEnterpriseLabel();

    /**
     * @author Yu.
     * @Description // 查询团队标签
     * @Date 2024/4/19 14:18
     * @param query
     * @param pageable
     * @return com.cdyd.ecm.base.PageInfo<com.cdyd.ecm.modules.label.domain.dto.FilesLabelDto>
     **/
    TableDataInfo<FilesLabelDto> queryAllTeam(FilesLabelQueryParam query,Pageable pageable);

    boolean queryLabelTypeByIdExistence(FilesLabelExistence existence);


    /**
     * 查询所有数据不分页
     * @param query 条件参数
     * @return List<FilesUserLabelDto>
     */
    TableDataInfo<FilesLabelDto> queryAll(FilesLabelQueryParam query, Pageable pageable);


    FilesLabelDto insert(FilesLabelDto resources) throws BadRequestException;


    boolean labelNameRepeat(String userId,String username,String labelName ,String labelType,Long parentId,Long id);


    boolean updateById(FilesLabelDto resources) throws BadRequestException;


    R deleteByIdsAndType(Set<Long> ids, String teamId , String labelType, boolean is );

}
